# -*- coding: utf-8 -*-

# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html

import scrapy

INT_FIELD = ['floor','building_floor','rental','rental_limit','service_fee','deposit','payment_deposit','payment_rental','room_area','house_area']

class HouseItem(scrapy.Item):
    title = scrapy.Field()
    content = scrapy.Field()
    price = scrapy.Field()
    city = scrapy.Field()
    district = scrapy.Field()
    block = scrapy.Field()
    address = scrapy.Field()
    lati = scrapy.Field()
    longi = scrapy.Field()
    position = scrapy.Field()
    room_type = scrapy.Field()
    room_num = scrapy.Field()
    bed_num = scrapy.Field()
    bathroom_num = scrapy.Field()
    max_live_people = scrapy.Field()
    house_area = scrapy.Field()
    crawl_date = scrapy.Field()
    pictures = scrapy.Field()
    source_url = scrapy.Field()
    uniqe_key = scrapy.Field() #抓取数据特征，有时间
    features = scrapy.Field()#房间特征
    collection = scrapy.Field()
    subway = scrapy.Field() # 附近地铁
    bus = scrapy.Field() # 附近地铁
    review_num = scrapy.Field()
    rating = scrapy.Field()
    calendar = scrapy.Field()
    owner_id = scrapy.Field()
    reviews = scrapy.Field()
    owner_review_num = scrapy.Field()
    owner_url = scrapy.Field()
    owner_house_num = scrapy.Field()
    owner_des = scrapy.Field()
    owner_reg_date = scrapy.Field()

    def set(self, key, value):
        self._values[key] = value

    def get(self, key, default=''):
        return self._values.get(key, default)